home *** CD-ROM | disk | FTP | other *** search
- #include <string.h>
-
- #include "netmail.hpp"
-
- /*=========================================================================*/
-
- void NetMail::Init (char *path)
-
- {
- strcpy (Path, path);
- current = net_getlastread (path);
- current = Next ();
- }
-
- int NetMail::First (void)
-
- {
- return (net_first (Path));
- }
-
- int NetMail::Next (void)
-
- {
- return (net_next (Path, current));
- }
-
- int NetMail::Last (void)
-
- {
- return (net_last (Path));
- }
-
- int NetMail::Prev (void)
-
- {
- return (net_prev (Path, current));
- }
-
- int NetMail::GetLastRead (void)
-
- {
- return (net_getlastread (Path));
- }
-
- int NetMail::SetLastRead (int lastread)
-
- {
- return (net_setlastread (Path, lastread));
- }
-
- int NetMail::ReadHdr (int msgno)
-
- {
- return (net_read_hdr (Path, msgno, &hdr));
- }
-
- int NetMail::ReadText (int msgno)
-
- {
- txt = net_read_text (Path, msgno);
- return (txt ? 0 : 1);
- }
-
- int NetMail::Write (void)
-
- {
- return (Write (Last() + 1));
- }
-
- int NetMail::Write (int msgno)
-
- {
- return (net_write (Path, msgno, &hdr, txt));
- }
-
- int NetMail::Kill (int msgno)
-
- {
- return (net_kill (Path, msgno));
- }
-